%% $Revision: 6.2 $
%===============================================================================
% LaTeX style file for MOLCAS documents, September 1996
%===============================================================================
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{molsoc}[1996/09/11]
\RequirePackage{graphicx}
%-------------------------------------------------------------------------------
% horisontal
\setlength\oddsidemargin  {5mm}
\setlength\evensidemargin {0mm}
\setlength\textwidth      {\paperwidth}
\addtolength\textwidth    {-2in}
\addtolength\textwidth    {-\oddsidemargin}
% vertical
\setlength\topmargin      {0mm}
%\setlength\headheight     {0mm}
%\setlength\headsep        {0mm}
%\setlength\topskip        {0mm}
%\setlength\footskip       {0mm}
%\setlength\footheight     {0mm}
\setlength\textheight     {\paperheight}
\addtolength\textheight   {-2in}
\addtolength\textheight   {-\topmargin}
\addtolength\textheight   {-\headheight}
\addtolength\textheight   {-\headsep}
%\addtolength\textheight   {-\footskip}
%-------------------------------------------------------------------------------
\hyphenation{molsoc}
\hyphenation{cas-scf}
\hyphenation{ras-scf}
%-------------------------------------------------------------------------------
\parindent 0pt
\parskip .7em plus 2pt minus 2pt
\renewcommand{\thefootnote}{\fnsymbol{footnote}}
\def\@chapapp{Section}
\setcounter{secnumdepth}{2}
\setcounter{tocdepth}{1}
\raggedbottom
%-------------------------------------------------------------------------------
\ifcase\@ptsize
  \font\inputfont=cmtt9
  \font\sourcefont=cmtex9
  \font\keyfont=cmcsc10
  \font\cmndfont=cmss10
  \font\prgmfont=cmtt10
  \font\filefont=cmsltt10
  \font\varfont=cmr10
  \font\ftnfont=cmss10
\or
  \font\inputfont=cmtt9
  \font\sourcefont=cmtex9
  \font\keyfont=cmcsc10 scaled \magstephalf
  \font\cmndfont=cmss10 scaled \magstephalf
  \font\prgmfont=cmtt10 scaled \magstephalf
  \font\filefont=cmsltt10 scaled \magstephalf
  \font\varfont=cmr10 scaled \magstephalf
  \font\ftnfont=cmss10 scaled \magstephalf
\or
  \font\inputfont=cmtt9 scaled \magstephalf
  \font\sourcefont=cmtex9 scaled \magstephalf
  \font\keyfont=cmcsc10 scaled \magstep1
  \font\cmndfont=cmss10 scaled \magstep1
  \font\prgmfont=cmtt10 scaled \magstep1
  \font\filefont=cmsltt10 scaled \magstep1
  \font\varfont=cmr10 scaled \magstep1
  \font\ftnfont=cmss10 scaled \magstep1
\fi
%-------------------------------------------------------------------------------
\def\logo[#1]{{\includegraphics[width=#1]{logo}}}
\def\namelist#1{\fbox{\inputfont\obeyspaces\catcode`\_=11\catcode`\&=11 #1}}
\def\molsoc{$\cal M\kern-0.10em O\kern-0.15em L\kern-0.00em C\kern-0.10em A\kern-0.05em S$}
\def\molsocthis{\molsoc\hbox{-\molsocversion}}
\def\molsoci{\molsoc\hbox{-1}}
\def\molsocii{\molsoc\hbox{-2}}
\def\molsociii{\molsoc\hbox{-3}}
\def\molsociv{\molsoc\hbox{-4}}
\def\molsocv{\molsoc\hbox{-5}}
\def\molsocvi{\molsoc\hbox{-6}}
\def\molsocvii{\molsoc\hbox{-7}}
\def\molsocviii{\molsoc\hbox{-8}}
\def\molsocxi{\molsoc\hbox{-9}}
\def\keyword#1{{\keyfont #1}}
\def\program#1{{\tt\uppercase{#1}}}
\def\command#1{{\cmndfont #1}}
\def\file#1{{\filefont #1}}
\def\ftncode#1{{\tt #1}}
\def\flowchart#1{\includegraphics{tutorials/flow-#1}}
%-------------------------------------------------------------------------------
% List of input decks
\newenvironment{inputlisting}%
{\noindent\vskip 6pt\begingroup%
\inputfont\baselineskip10pt\parskip=0pt\parindent=6pt%
\catcode`\&=11\catcode`\$=11\catcode`\_=11\catcode`\#=11%
\obeylines\catcode`\ =11%
\def\cc!{{\char18}}%
}%
{\endgroup\vskip 6pt}
%-------------------------------------------------------------------------------
% List of source code
\newenvironment{sourcelisting}%
{\noindent\vskip 6pt\begingroup%
\sourcefont\baselineskip10pt\parskip=0pt\parindent=6pt%
\catcode`\&=11\catcode`\$=11\catcode`\_=11\catcode`\#=11%
\obeylines\catcode`\ =11%
\def\cc!{{\inputfont\char18}}%
}%
{\endgroup\vskip 6pt}
%-------------------------------------------------------------------------------
% List of programs
\def\prgmmklab#1{\prgmfont#1\hfil}
\newenvironment{programlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it program}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\prgmmklab%
\item[\it Program]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of files
\def\filemklab#1{\filefont #1\hfil}
\newenvironment{filelist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it file}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\filemklab%
\item[\it File]{\it Contents}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of commands
\def\cmndmklab#1{\cmndfont #1\hfil}
\newenvironment{commandlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it command}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\cmndmklab%
\item[\it Command]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of variables
\def\cmndvarlab#1{\varfont #1\hfil}
\newenvironment{variablelist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it variable}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\cmndvarlab%
\item[\it Variable]{\it Purpose}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of keywords
\def\keymklab#1{\keyfont #1\hfil}
\newenvironment{keywordlist}%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{\it keyword}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\keymklab%
\item[\it Keyword]{\it Meaning}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
% List of subroutine syntax
\newif\ifarguments\argumentsfalse
\def\synmklab#1{\tt #1\hfil\global\argumentstrue}
\newenvironment{syntaxlist}[1]%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{---}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\synmklab%
\item[\bf Syntax:]{#1}\nopagebreak\medskip\nopagebreak%
\global\argumentsfalse%
\hrule\nopagebreak}%
{\ifarguments\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}%
\else\medskip\end{list}\fi}
%-------------------------------------------------------------------------------
% List of general items
\def\whatmklab#1{\currfont #1\hfil}
\newenvironment{whatnotlist}[3]%
{\noindent\medskip%
\hrule\nopagebreak\smallskip\nopagebreak%
\hrule\nopagebreak%
\begin{list}%
{~}%
{\topsep0mm\labelsep5mm\labelwidth30mm\leftmargin35mm\rightmargin5mm}\nopagebreak%
\let\makelabel=\whatmklab%
\let\currfont=#1
\item[\it #2]{\it #3}\nopagebreak\medskip\nopagebreak%
\hrule\nopagebreak}%
{\nopagebreak\medskip\nopagebreak\hrule\medskip\end{list}}
%-------------------------------------------------------------------------------
\def\molsocversion{6.2}
\def\molsocversionnodots{62}
\def\MolcasEmail{\file{molsoc@signe.teokem.lu.se}}
\def\MolcasWWW{\file{http://www.teokem.lu.se/molsoc}}
%-------------------------------------------------------------------------------
% Define command \visiblespace
\makeatletter
\newsavebox{\@visiblespacebox}
\begin{lrbox}{\@visiblespacebox}
\verb*| |
\end{lrbox}
\def\visiblespace{\usebox{\@visiblespacebox}}
\makeatother
